package com.holly.common_view.bean;

import java.util.List;

/**
 * 2017/3/6 <br/>
 *
 * @author Joey Huang QQ:273179370）
 */
public class Tree implements Cloneable,CheckedSpec{
    private String id;
    private String name;
    private String count;
    private List<Tree> list;
    private boolean checked;

    public Tree(String id, String name) {
        this.id = id;
        this.name = name;
    }

    public String getCount() {
        return count;
    }

    public void setCount(String count) {
        this.count = count;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    @Override
    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    @Override
    public boolean isChecked() {
        return checked;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Tree> getList() {
        return list;
    }

    public void setList(List<Tree> list) {
        this.list = list;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj != null && obj instanceof Tree) {
            Tree tree = (Tree) obj;
            return tree.id.equals(id);
        } else {
            return false;
        }
    }
}
